← all writing
thoughts

How To Think Like An Engineer

A micro walkthrough on problem solving steps and what questions to ask when facing problems or when you're curious on how things work (from a juniors view)

CachingCritical-ThinkinghttpLogsNetworkingProblem-SolvingProtocolsSoftware-EngineeringWeb-Development March 07, 2026
March 07, 2026

Before Starting

After watching some KubeCon conferences and reading a bunch of internet blogs about infrastructure and platform engineering, I stumbled upon a video talking about non-functional testing in Kubernetes, and I thought of writing this text for my colleagues that are learning web development. I chose to write it in a way that could help them not by teaching how to write a piece of code —the internet is full of them anyways, but to explain how to think like real a engineer using real life examples, and to be courage about publishing code that might look flawless, but in a way or another you are, and will, be facing a lot of errors and weird cases you never expected that could be beyond your knowledge level. And there comes the real fun of learning!

[!NOTE] Note
When I first wrote this, it was meant to talk about caching systems, which first poped on my head watching the non-functional testing video, to teach about some ways to handle high loads other than scaling and such .. So it might look like more caching focused.


Scenario

You’ve created a small website to show your friends your out-of-the-world skills in web development, what the website does is it takes a given birth date and calculates your age in years, months, days, hours, minutes and seconds, your group of 5 friends starts using the website and they seem excited about it, they start sharing it with their friends on social media, then you see people talking about your website in the university’s group chat (the one with 6K members), your winy tiny server starts receiving a huge amounts of requests and you didn’t expect it to handle such case, now your logs look like this:

91.72.146.79    - - "GET /2004/8/22     HTTP/1.1" https://calculatemyage.xyz
172.34.159.142  - - "GET /2003/3/3      HTTP/1.1" https://calculatemyage.xyz
172.171.75.124  - - "GET /2005/4/21     HTTP/1.1" https://calculatemyage.xyz
198.117.216.61  - - "GET /2003/10/17    HTTP/1.1" https://calculatemyage.xyz
198.39.67.25    - - "GET /2004/12/6     HTTP/1.1" https://calculatemyage.xyz
91.1.207.196    - - "GET /2004/4/18     HTTP/1.1" https://calculatemyage.xyz
172.226.142.103 - - "GET /2004/1/12     HTTP/1.1" https://calculatemyage.xyz
91.156.166.188  - - "GET /2003/7/8      HTTP/1.1" https://calculatemyage.xyz
198.92.80.225   - - "GET /2005/1/7      HTTP/1.1" https://calculatemyage.xyz
172.92.93.110   - - "GET /2003/1/23     HTTP/1.1" https://calculatemyage.xyz
91.14.47.79     - - "GET /2005/1/18     HTTP/1.1" https://calculatemyage.xyz
198.7.9.129     - - "GET /2005/8/20     HTTP/1.1" https://calculatemyage.xyz
198.96.7.70     - - "GET /2005/12/11    HTTP/1.1" https://calculatemyage.xyz
91.18.245.236   - - "GET /2005/4/21     HTTP/1.1" https://calculatemyage.xyz
91.18.245.236   - - "GET /2005/4/21     HTTP/1.1" https://calculatemyage.xyz
91.80.39.91     - - "GET /2003/7/31     HTTP/1.1" https://calculatemyage.xyz
91.50.208.97    - - "GET /2004/8/16     HTTP/1.1" https://calculatemyage.xyz
172.187.206.138 - - "GET /2005/3/15     HTTP/1.1" https://calculatemyage.xyz
91.56.91.117    - - "GET /2003/10/13    HTTP/1.1" https://calculatemyage.xyz
172.50.18.11    - - "GET /2005/4/21     HTTP/1.1" https://calculatemyage.xyz
...

Now, your server bill is \$\$\$ and the website slowed down, or even worse, stopped working and no one can use it anymore (you lost your fame :/).

As a software engineer, how would you resolve the issue?
- Without technical details, how can you spot the issue?
- Why did the website slowed down/stopped working?
- How to handle repetitive requests?


Next Step

What you are expected to do: (in my opinion)
1. With nothing but your eyes, analyse the logs above, then type as much information as you can notice. %% patterns, repetitions, etc.. %%
2. Without the use of computation or any modern problem-solving applications, how would YOU interact with the information you got from Step 1?
3. Ask yourself some question, is your solutions related to changing the code? Perhaps the network model in your server? Or if you got money, maybe purchase a better specs server?
4. Now the critical question, is it more a case of updating the current resources to fit the new problem? Or is there some technologies we can add to improve handling the requests?
5. Are *the* technologies strongly focused on solving the sole of this specific issue and there is no way I could’ve known them (scenario was an advertisement)? %% Simple answer: No. %%
%% Changing point here %%
6. Is there a way to speed up our algorithm so that response time becomes faster? Remember that our service is most likely be visited once, the faster the client gets his response the faster he will leave, hence reducing the load on the website.
7. Should I change the way it calculates age? Or something I might add to help speed up the process (maybe look at my notes from Step 1 & 2).
%% Changing point here %%
8. How can I implement a method to store previously calculated birth dates? How would it affect the speed of our website? And is there any downsides?
9. What if the storage gets full and all birth dates are calculated, would this still be working fast? If not, what changes you think will happen?

Learning Outcomes:
- Problem Solving
- Critical Thinking
- Web Development
- Basic Networking (HTTP Protocol)
- Caching

← all writing